*******************************************************
** 					REPLICATION MATERIAL 
** 
** "Do Authoritarian Elections Help the Poor? Evidence from Russian Cities"
**					(APPENDIX TABLE A4)
**
**					   	   by 				 			 	  
**			Quintin H. Beazer & Ora John Reuter
**
**						     in							 	  
** 				The Journal of Politics		 	  
**													 	  
*******************************************************

* File created and checked May 2020 using Stata 14. To ask questions 
* or report a suspected error, please contact the authors. We are happy 
* to correspond with others about the project. Send emails to: 
* Quintin Beazer (qbeazer@fsu.edu) or John Reuter (reutero@uwm.edu) 

* This .do file is called by the main .do file: BeazerReuterHousingTables.do.
* This file contains code to merge RLMS survey data with city-level
* data from the main dataset: zhilJOP.dta.  Merging these datasets is
* required to replicate results for appendix Table A4.




** load RLMS dataset
use "HH_1994_2015_v1.dta", clear 

gen city=""
replace city="Batajsk" if psu== 21 
replace city="Bijsk" if psu== 33 
replace city="Cheljabinsk" if psu== 25 
replace city="Glazov" if psu== 27 
replace city="Kazan'" if psu== 16 
replace city="Krasnodar" if psu== 22 
replace city="Krasnojarsk" if psu== 35 
replace city="Kurgan" if psu== 26 
replace city="Lipeck" if psu== 14 
replace city="Miass" if psu== 30 
replace city="Nizhnij Novgorod" if psu== 11 
replace city="Orsk" if psu== 28 
replace city="Saratov" if psu== 17 
replace city="Smolensk" if psu== 7 
replace city="Solikamsk" if psu== 29 
replace city="Syktyvkar" if psu== 4 
replace city="Tambov" if psu== 38 
replace city="Tomsk" if psu== 31 
replace city="Tula" if psu== 9 
replace city="Vladivostok" if psu== 36 
    
replace city="Tjumen'" if psu== 32  & year<=2002
replace city="Berdsk" if psu== 32  & year>=2003
sort city year

rename region regionname

* merge housing dataset
merge m:1 city year using "zhilJOP.dta"

tab _merge
keep if _merge==3
drop _merge

